package com.sxg.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sxg.entity.SxgOrderEntity;
import com.sxg.vo.resp.OrderItemRespVo;
import jakarta.validation.constraints.NotNull;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

/**
 * 订单表
 *
 * @author 浪漫写尽歌谱 3298751420@qq.com
 * @since 1.0.0 2024-03-07
 */
@Mapper
public interface SxgOrderDao extends BaseMapper<SxgOrderEntity> {

    Set<Long> selectByUserIdAndStatusGoodsids(@Param("userId") Long userId, @Param("status") List<Integer> status, @Param("time") String time, @Param("limit") Integer limit, @Param("page") Integer pageNum);

    List<OrderItemRespVo> selectByUserIdAndStatus(@Param("orderIds") Set<Long> orderIds);

    Integer selectByUserIdAndStatusCount(@Param("userId") Long userId, @Param("status") List<Integer> status);

    List<OrderItemRespVo> selectSearchByOrderIdAndGoodsName(@Param("userId") Long userId, @Param("text") String text);

    List<OrderItemRespVo> selectOrderInfoById(@Param("userId") Long userId, @Param("orderId") Long id);

}